package org.wh1tew0lf.vframe.framework;

import java.util.Map;

import org.wh1tew0lf.vframe.framework.vframeexception.VFrameException;

public enum VDatabaseRestrictionLogicOperator implements IDatabaseOperator {
	AND("(##VALUES##)", " AND ", false),
	OR("(##VALUES##)", " OR ", false);

	private String formatText;
	private String seperator;
	private boolean rawValueData;

	private VDatabaseRestrictionLogicOperator(String formatText, String seperator, boolean rawValueData) {
		this.formatText = formatText;
		this.seperator = seperator;
		this.rawValueData = rawValueData;
	}

	@Override
	public String toString(boolean rawValueData, String fieldName, Map<String, String> fieldNameMap,
			IDatabaseRestriction... restrictions) throws VFrameException {
		this.formatText = rawValueData ? "##VALUE_0##" : this.formatText;
		return AbstractDatabaseOperator.toString(this.rawValueData, formatText, seperator,
				fieldName, fieldNameMap, restrictions);
	}

}
